import socket from '../../service/socket/index'
export default {
  state:()=>({
    x:0,
    y:0,
    painter:''
  }),
  mutations:{
    changePaint(paint,paintPoint){
      paint.x = paintPoint.x
      paint.y = paintPoint.y
    },
    changePainter(paint,currentPainter){
      paint.painter = currentPainter
    }
  },
  actions:{
    paint({commit},point){
      commit('changePaint',point)
      commit('changePainter',point.painter)
    }
  }
}